class DateFormatter {
    static getFormattedDate() {
      const today = new Date();
      const year = today.getFullYear();
      const month = today.getMonth() + 1; // Adjust for zero-based month indexing
      const day = today.getDate();
  
      return `${year}-${month < 10 ? `0${month}` : month}-${day < 10 ? `0${day}` : day}`;
    }
  }
  
  // Usage example
  const formattedDate = DateFormatter.getFormattedDate();
  console.log(formattedDate); // Output: yyyy-mm-dd formatted date
  